const search = {
  state: {
    searchFormData: {},
    sateCheckList: [],
    currentNodeId: "1"
  },
  getters: {
    getSearchData(status) {
      const { searchFormData, sateCheckList, currentNodeId } = status;
      return { searchFormData, sateCheckList, currentNodeId };
    }
  },
  mutations:{
    SET_SEARCHDATA( data) {
      if (data) {
        const { searchFormData, sateCheckList, currentNodeId } = data;
        this.searchFormData = searchFormData;
        this.sateCheckList = sateCheckList;
        this.currentNodeId = currentNodeId;
      } else {
        this.searchFormData = {};
        this.sateCheckList = [];
        this.currentNodeId = "1";
      }
    },
  },
};
export default search;
